package com.kfyang.manualgear.generator.impl.jdbc.orm;

import com.kfyang.manualgear.generator.declare.orm.OrmGenerator;

import javax.lang.model.element.ExecutableElement;
import javax.lang.model.type.TypeMirror;
import java.util.List;

public class OrmGeneratorJdbcImpl extends OrmGenerator {

    public OrmGeneratorJdbcImpl(List<ExecutableElement> elements, TypeMirror entityType) {
        super(elements, entityType);
    }

    @Override
    protected void generateSelectMethod(boolean forOne) {
        new SelectMethod(methodBuilder, entityInfo, forOne).generate();
    }

    @Override
    protected void generateInsertMethod(boolean forOne) {
        new InsertMethod(methodBuilder, entityInfo, forOne).generate();
    }

    @Override
    protected void generateUpdate() {
        new UpdateMethod(methodBuilder, entityInfo, true).generate();
    }

    @Override
    protected void generateDeleteMethod(boolean forOne) {
        new DeleteMethod(methodBuilder, entityInfo, forOne).generate();
    }
}
